Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update TraceForgeEvent logging details #537

Merged
merged 1 commit into from
Feb 5, 2020

Conversation

Jimbo4350
Copy link
Contributor

@Jimbo4350 Jimbo4350 commented Feb 4, 2020

  • Update tracer TraceAdoptedBlock to log the block hash and a list of txids in that block.

Example output: [cardano.node.Forge:Info:61] [2020-02-04 18:08:26.00 UTC] {"kind":"TraceAdoptedBlock","slot":6,"tx ids":"[txid: txid:6875a2f9]","block hash":"a6d8325832257989"}

  • Update the following tracers to Error severity:
    TraceNoLedgerState
    TraceNoLedgerView
    TraceBlockFromFuture
    TraceDidntAdoptBlock
    TraceForgedInvalidBlock

Relevant issue: #528

@Jimbo4350
Copy link
Contributor Author

Jimbo4350 commented Feb 4, 2020

We may want to remove the "txid" string from the Condense CC.TxId instance in ouroboros-network because it is redundant: "tx ids":"[txid: txid:6875a2f9]"

@Jimbo4350 Jimbo4350 requested review from dcoutts and CodiePP February 4, 2020 18:27
Copy link
Contributor

@CodiePP CodiePP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to be discussed;
a block could contain many transactions;
printing them all would have a performance impact

toObject _verb (TraceAdoptedBlock slotNo _blk _txs) =
instance (HasTxId tx, ProtocolLedgerView blk, Condense (HeaderHash blk), Show (TxId tx))
=> ToObject (TraceForgeEvent blk tx) where
toObject _verb (TraceAdoptedBlock slotNo blk txs) =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should probably print the list of transaction ids only if _verb == 'MaximumVerbosity'
can potentially be huge!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CodiePP changes made

… txids in

that block

Update the following tracers to Error severity:
 TraceNoLedgerState
 TraceNoLedgerView
 TraceBlockFromFuture
 TraceDidntAdoptBlock
 TraceForgedInvalidBlock
@Jimbo4350 Jimbo4350 force-pushed the jordan/block-forging-tracing-default-log-level branch from 8fbdf09 to f11f46d Compare February 5, 2020 13:41
Copy link
Contributor

@CodiePP CodiePP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@Jimbo4350
Copy link
Contributor Author

bors r+

iohk-bors bot added a commit that referenced this pull request Feb 5, 2020
537: Update `TraceForgeEvent` logging details r=Jimbo4350 a=Jimbo4350

- Update tracer `TraceAdoptedBlock` to log the block hash and a list of txids in that block. 

Example output: `[cardano.node.Forge:Info:61] [2020-02-04 18:08:26.00 UTC] {"kind":"TraceAdoptedBlock","slot":6,"tx ids":"[txid: txid:6875a2f9]","block hash":"a6d8325832257989"}`


- Update the following tracers to `Error` severity:
 `TraceNoLedgerState`
 `TraceNoLedgerView`
 `TraceBlockFromFuture`
 `TraceDidntAdoptBlock`
 `TraceForgedInvalidBlock`

Relevant issue: #528 

Co-authored-by: Jordan Millar <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Feb 5, 2020

@iohk-bors iohk-bors bot merged commit f11f46d into master Feb 5, 2020
@iohk-bors iohk-bors bot deleted the jordan/block-forging-tracing-default-log-level branch February 5, 2020 20:39
deepfire added a commit that referenced this pull request Apr 15, 2020
Changes in iohk-monitoring:

  - CAD 484 | trace forwarding:  named pipes for windows (#537)
  - cabal.project: Bump Hackage index-state
  - CAD-710 textual representation from structured trace (#536)
  - Fix ghc provided by stack-shell.nix (#541)
  - Update stack.yaml (#542)
  - update katip to latest version
deepfire added a commit that referenced this pull request Apr 15, 2020
Changes in iohk-monitoring:

  - CAD 484 | trace forwarding:  named pipes for windows (#537)
  - cabal.project: Bump Hackage index-state
  - CAD-710 textual representation from structured trace (#536)
  - Fix ghc provided by stack-shell.nix (#541)
  - Update stack.yaml (#542)
  - update katip to latest version
deepfire added a commit that referenced this pull request Apr 15, 2020
Changes in iohk-monitoring:

  - CAD 484 | trace forwarding:  named pipes for windows (#537)
  - cabal.project: Bump Hackage index-state
  - CAD-710 textual representation from structured trace (#536)
  - Fix ghc provided by stack-shell.nix (#541)
  - Update stack.yaml (#542)
  - update katip to latest version
deepfire added a commit that referenced this pull request Apr 15, 2020
Changes in iohk-monitoring:

  - CAD 484 | trace forwarding:  named pipes for windows (#537)
  - cabal.project: Bump Hackage index-state
  - CAD-710 textual representation from structured trace (#536)
  - Fix ghc provided by stack-shell.nix (#541)
  - Update stack.yaml (#542)
  - update katip to latest version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants